package com.example.mapper.starrocks;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.example.bean.UserPO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.ResultType;
import org.apache.ibatis.annotations.Select;

import java.util.List;
import java.util.Map;

@Mapper
public interface StarRocksMapper extends BaseMapper<UserPO> {
/*    @Select("<script>" +
            "#{sql}"
            + "</script>")
    @ResultType(List.class)
        //@Options(flushCache = Options.FlushCachePolicy.TRUE)
        //@Lang(SimpleSelectInLangDriver.class)
    Page<Map<String, Object>> getData(Page<Map<String, Object>> page, @Param("searchParam") Object param);*/


    @Select("<script>" +
            "#{sql}"
            + "</script>")
    @ResultType(List.class)
        //@Options(flushCache = Options.FlushCachePolicy.TRUE)
        //@Lang(SimpleSelectInLangDriver.class)
    Page<Map<String, Object>> searchData(Page<Map<String, Object>> page, @Param("searchParam") Object param);

}
